import request from '@/utils/request'

// 获取图形验证码
export const getPicCode = () => {
  return request('/captcha/image')
}

// 发送验证码
export const sendCode = (code,key,mobile) => {
  return request({
    method: "post",
    url: '/captcha/sendSmsCaptcha',
    data: {
      form: {
        captchaCode: code,
        captchaKey: key,
        mobile: mobile
      }
    }
  })
}

// 验证码登录
export const login = (mobile,smsCode) => {
  return request({
    method: "post",
    url: '/passport/login',
    data: {
      form: {
        isParty: false,
        partyData: {},
        mobile: mobile,
        smsCode: smsCode
      }
    }
  })
}